{strip}
{include file="common/header.tpl"}
<section class="main">
    <article class="right-col">  
        <h2>{$language.title.admin} &raquo; <a href="{$smarty.const.HOST_BACKEND}admin/add">{$language.ahref.add}</a></h2>
        <form id="frmAdmin" name="frmAdmin" method="post" action="{$smarty.const.HOST_BACKEND}admin/act" enctype="multipart/form-data">
            <input type="hidden" name="paction" id="paction" />
            <input type="hidden" name="pcancelsearch" id="pcancelsearch"/>
            <div class="s-button">
                <button type="button" onclick="javascript:confirmPending(this.form);" title=""><strong>{$language.btn.inactive}</strong></button>
                <button type="button" onclick="javascript:confirmActive(this.form);" title=""><strong>{$language.btn.active}</strong></button>
            </div>
            {if isset($arrResult) && is_array($arrResult)}
                <div class="s-page">
                    <strong class="total">{$language.common.total}: {$intTotal}</strong>
                    {paging total=$intTotal limit=$intLimit offset=$intOffset}
                </div>
            {/if}
            <table width="100%" cellpadding="0" cellspacing="0" border="0" class="list">
                <thead>
                    <tr>
                        <th class="16"><input type="checkbox" name="pcheckall" id="pcheckall" onclick="javascript:checkAll(this.form,'padminid[]',this.checked);"/></th>
                        <th class="150">{$language.label.username}</th>
                        <th class="150">{$language.label.fullname}</th>
                        <th class="80">{$language.label.role}</th>
                        <th class="80">{$language.label.status}</th>
                        <th>&nbsp;</th>
                    </tr>
                </thead>
                <tbody>
                    {foreach key=i item=item from=$arrResult}
						<tr>
							<td align="center"><input type="checkbox" name="pcheckall" id="pcheckall" onclick="javascript:checkAll(this.form,'padminid[]',this.checked);"/></td>
							<td>{$item.username}</td>							
							<td>{$item.fullname}</td>
							<td>{$arrType[$item.type]}</td>
							<td>{$arrStatus[$item.status]}</td>
							<td>
                            	{if $item.type <= $AppUI->type}
                                    <a href="{$smarty.const.HOST_BACKEND}permission/?adminid={$item.adminid}">{$language.title.permission}</a>
                                    &nbsp;|&nbsp;
                                {/if}
                                <a href="{$smarty.const.HOST_BACKEND}admin/edit?adminid={$item.adminid}">{$language.ahref.update}</a>
                                &nbsp;|&nbsp;
                                <a href="{$smarty.const.HOST_BACKEND}admin/changepw?adminid={$item.adminid}">{$language.ahref.changepw}</a>
                            </td>
						</tr>
					{/foreach}
                </tbody>
            </table>
            {if isset($arrResult) && is_array($arrResult)}
                <div class="s-page">
                    <strong class="total">{$language.common.total}: {$intTotal}</strong>
                    {paging total=$intTotal limit=$intLimit offset=$intOffset}
                </div>
            {/if}
            <div class="s-button">
                <button type="button" onclick="javascript:confirmPending(this.form);" title=""><strong>{$language.btn.inactive}</strong></button>
                <button type="button" onclick="javascript:confirmActive(this.form);" title=""><strong>{$language.btn.active}</strong></button>
            </div>
        </form>
	</article>
</section>
{include file="common/footer.tpl"}
{/strip}
                
